home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / SegLoad.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  2.7 KB  |  141 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SegLoad.h
  3.  
  4.      Contains:    Segment Loader Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __SEGLOAD__
  18. #define __SEGLOAD__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23.  
  24.  
  25.  
  26. #if PRAGMA_ONCE
  27. #pragma once
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37.  
  38. #if PRAGMA_STRUCT_ALIGN
  39.     #pragma options align=mac68k
  40. #elif PRAGMA_STRUCT_PACKPUSH
  41.     #pragma pack(push, 2)
  42. #elif PRAGMA_STRUCT_PACK
  43.     #pragma pack(2)
  44. #endif
  45.  
  46. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  47. /*
  48.    CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  49.    and the AppFile data structure and enums are obsolete. 
  50.    They are still supported for writing old style 68K apps, 
  51.    but they are not supported for CFM-based apps.
  52.    Use AppleEvents to determine which files are to be 
  53.    opened or printed from the Finder.
  54. */
  55.  
  56. enum {
  57.     appOpen                        = 0,                            /*Open the Document (s)*/
  58.     appPrint                    = 1                                /*Print the Document (s)*/
  59. };
  60.  
  61.  
  62. struct AppFile {
  63.     short                             vRefNum;
  64.     OSType                             fType;
  65.     short                             versNum;                    /*versNum in high byte*/
  66.     Str255                             fName;
  67. };
  68. typedef struct AppFile                    AppFile;
  69. EXTERN_API( void )
  70. CountAppFiles                    (short *                message,
  71.                                  short *                count);
  72.  
  73. EXTERN_API( void )
  74. GetAppFiles                        (short                     index,
  75.                                  AppFile *                theFile);
  76.  
  77. EXTERN_API( void )
  78. ClrAppFiles                        (short                     index);
  79.  
  80. EXTERN_API( void )
  81. GetAppParms                        (Str255                 apName,
  82.                                  short *                apRefNum,
  83.                                  Handle *                apParam)                            ONEWORDINLINE(0xA9F5);
  84.  
  85. #if CGLUESUPPORTED
  86. EXTERN_API_C( void )
  87. getappparms                        (char *                    apName,
  88.                                  short *                apRefNum,
  89.                                  Handle *                apParam);
  90.  
  91. #endif  /* CGLUESUPPORTED */
  92.  
  93. #endif  /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
  94.  
  95.  
  96. /*
  97.    Because PowerPC applications don’t have segments.
  98.    But, in order to allow applications to not have conditionalized
  99.    source code, UnloadSeg is macro'ed away for PowerPC.
  100. */
  101. #if TARGET_CPU_68K
  102. EXTERN_API( void )
  103. UnloadSeg                        (void *                    routineAddr)                        ONEWORDINLINE(0xA9F1);
  104.  
  105. #else
  106. #define UnloadSeg(x)
  107. #endif  /* TARGET_CPU_68K */
  108.  
  109.  
  110.  
  111.  
  112. #if OLDROUTINELOCATIONS
  113. EXTERN_API( void )
  114. ExitToShell                        (void)                                                        ONEWORDINLINE(0xA9F4);
  115.  
  116. #endif  /* OLDROUTINELOCATIONS */
  117.  
  118.  
  119.  
  120.  
  121. #if PRAGMA_STRUCT_ALIGN
  122.     #pragma options align=reset
  123. #elif PRAGMA_STRUCT_PACKPUSH
  124.     #pragma pack(pop)
  125. #elif PRAGMA_STRUCT_PACK
  126.     #pragma pack()
  127. #endif
  128.  
  129. #ifdef PRAGMA_IMPORT_OFF
  130. #pragma import off
  131. #elif PRAGMA_IMPORT
  132. #pragma import reset
  133. #endif
  134.  
  135. #ifdef __cplusplus
  136. }
  137. #endif
  138.  
  139. #endif /* __SEGLOAD__ */
  140.  
  141.